<include file="public@header"/>
</head>
<body>
<div class="wrap">
<!--    <ul class="nav nav-tabs">-->
<!--        <li><a href="{:url('order/index')}">订单列表</a></li>-->
<!--        <li><a href="{:url('order/receipt')}">包裹列表</a></li>-->
<!--        <li class="active"><a href="{:url('order/batch_express')}">批量发货</a></li>-->
<!--    </ul>-->
    <form class="well form-inline margin-top-20" method="post" action="{:url('order/batch_express?step=1')}">
<!--        <a type="button" class="btn btn-info" href="javascript:uploadOne('先择文件', '#file', 'file')">批量发货</a>-->
        <input type="text" class="form-control" id="file" name="file" value="" placeholder="发货文件" onclick="javascript:uploadOne('选择文件', '#file', 'file')">
        <input type="submit" class="btn btn-primary" value="提交">
        <a class="btn btn-info" href="javascript:openIframeLayer('doc','批量发货说明', {area:['90%','90%']})">说明</a>
    </form>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" enctype="multipart/form-data" action="{:url('order/batch_express?step=2')}">
        <table class="table table-bordered table-hover" id="showtable">
            <thead>
                <tr>
                    <th>订单号</th>
                    <th>快递公司</th>
                    <th>快递单号</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name="list" id="vo" k="key">
                <tr>
                    <td><input type="text" name="data[{$key}][obtain_order_no]" value="{$vo.obtain_order_no}" class="form-control"></td>
                    <td><input type="text" name="data[{$key}][delivery_company]" value="{$vo.delivery_company}" class="form-control"></td>
                    <td><input type="text" name="data[{$key}][delivery_no]" value="{$vo.delivery_no}" class="form-control"></td>
                    <td><button type="button" class="btn btn-danger btn-sm delbtn">删除</button></td>
                </tr>
            </volist>
            </tbody>
        </table>
        <div class="col-sm-10">
            <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('确认')}</button>
        </div>
    </form>
    <script src="__STATIC__/js/admin.js"></script>
    <script>
        $('#showtable').on('click', '.delbtn', function () {
            $(this).closest('tr').remove();
        })
    </script>
</div>
</body>
</html>